// 1. 导入
import React from 'react'
import { BrowserRouter, Link, Route, Switch, Redirect } from 'react-router-dom'

import Login from '@/pages/Login'
import Layout from '@/pages/Layout'

// 2. 创建
class App extends React.Component {
  render() {
    return (
      <BrowserRouter>
        <div className="app">
          <Switch>
            <Redirect exact from="/" to="/layout"></Redirect>
            <Route path="/login" component={Login}></Route>
            <Route path="/layout" component={Layout}></Route>
          </Switch>
        </div>
      </BrowserRouter>
    )
  }
}

// 3. 导出
export default App
